﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Dycox.Windows.Forms
{
    public class BindingConvertEventArgs : ConvertEventArgs
    {
        public BindingConvertEventArgs(Binding binding, object value, Type desiredType)
            : base(value, desiredType)
        {
            if (binding == null)
                throw new ArgumentNullException("binding");

            _binding = binding;
        }

        private readonly Binding _binding;

        public Binding Binding
        {
            get { return _binding; }
        }

        private bool _handled;

        public bool Handled
        {
            get { return _handled; }
            set { _handled = value; }
        }

    }

    public delegate void BindingConvertEventHandler(object sender, BindingConvertEventArgs e);
}
